A device of this type is known for example from DE 39 37 022 C1, in which the fastening portions are formed completely of a locking element in the shape of a loop and can each be arranged on a bearing journal of the first housing part and on a bearing journal of the second housing part so as to be able to close the first housing part with the second housing part in as secure a manner as possible. One drawback of such a design of the fastening portions of a locking element is that the fastening portions are very rigid owing to their design over the entire surface and thus the stresses on the bearing journal, in the region of the fastening of the fastening portions, that occur in particular when closing and opening the lock of the two housing parts are particularly high. Particularly high loads occur in this region as a result, and these can quickly lead to material fatigue in which, in the worst case scenario, part of the fastening portion can break off and as a result, the locking element no longer functions properly.